﻿using MvcOSGi.Shell.ActionFilter;
using MvcOSGi.Shell.App_Start;
using MvcOSGi.Shell.Infra;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BusinessLayer;
using System.Data.Linq;
using MvcOSGi.Shell.Models;

namespace MvcOSGi.Shell.Controllers
{
    public class EcommController : BaseController
    {
        [FillVersion]
        public ActionResult Index()
        {
            MultipleResultsBag x = new MultipleResultsBag();
            x.Add<Company.Company>(new Company.Company { CID = 1001, Domain = "test" });
            DataBag.Add(BusinessLayer.Enums.DataBagKey.ImageSliderData, x);

            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult home()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult Items()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult Blog()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult BlogSingle()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult Checkout()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult EditProfile()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult FAQ()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult About()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult Login()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        [FillVersion]
        public ActionResult NotFound()
        {
            using (var model = new PageViewModel(DataBag))
            {
                return View("index", model);
            }
        }

        public ActionResult Error(Exception exception)
        {
            TempData["message"] = exception;
            return View();
        }

    }
}
